Component({
  properties: {
    url: String,
    hoverClass: { type: String, value: "navigator-hover" },
    openType: { type: String, value: "navigate" },
    avatarWidth: { type: Number, value: 100 },
    avatar: { type: String, value: "/static/images/icon-unlogin.png" }
  },

  data: {
    loading: true,
    default: "/static/images/icon-unlogin.png"
  },

  methods: {
    loadError() {
      this.setData({ avatar: "/static/images/icon-unlogin.png" });
    },

    loading() {
      this.setData({ loading: false });
    }
  }
});
